<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>input类型下拉列表</title>
</head>
<body>
        <div class="changeDiv">
            <a>性别:</a>
            <input id="sex" type="text" list="sexlist">
            <datalist id="sexlist">
                <option id="nan">男</option>
                <option id="nv">女</option>
            </datalist>
        </div>
</body>
</html>